package com.shadow.mall.order.remote.dubbo;


import com.shadow.mall.address.domain.dto.AddressDTO;
import com.shadow.mall.address.domain.query.AddressQuery;
import com.shadow.mall.common.core.JsonResult;
import com.shadow.mall.order.remote.AddressService;
import com.shadow.mall.risk.api.RiskApi;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 地址服务远程接口
 *
 * @version 1.0
 */
@Component
public class RiskTestRemote {



    //@DubboReference(version = "1.0.0")
    private RiskApi riskApi;

    /**
     * 查询行政地址
     * @param query
     * @return
     */
    public String testDubbo(String query) {

        JsonResult<String> jsonResult = riskApi.testDubbo("xxxxxxxxx");
        if (jsonResult.getSuccess() && jsonResult.getData() != null) {
            return jsonResult.getData();
        }
        return null;
    }

}